package com.igeekhome.ccs.biz.impl;


import com.igeekhome.ccs.biz.ICustomerBiz;
import com.igeekhome.ccs.entity.Customer;
import com.igeekhome.ccs.entity.Hater;
import com.igeekhome.ccs.entity.Session;
import com.igeekhome.ccs.mapper.CustomerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class CustomerbizImpl implements ICustomerBiz {
    @Autowired
    CustomerMapper customerMapper;
    @Override
    public List<Customer> select(Customer cs) {
        return customerMapper.select(cs);
    }

    @Override
    public int save(Customer cs) {
        customerMapper.save(cs);
        return 0;
    }
    @Override
    public List<Customer> queryByTime(Date start, Date end) {
        return customerMapper.queryByTime(start,end);
    }

    @Override
    public int deletecustomer(int coustomerId) {
        customerMapper.deletecustomer(coustomerId);
        return 0;
    }

    @Override
    public List<Session> selectsession(int customerId) {
        return customerMapper.selectsession(customerId);
    }

    @Override
    public List<Hater> selecthater(int customerId) {
        return customerMapper.selecthater(customerId);
    }

    @Override
    public int updatecustomer(Customer cs) {
        customerMapper.upadatecustomer(cs);
        return 0;
    }


}
